<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-bind&v-on</title>
</head>
<body>
<div id="app">
    <a href="index.html">index</a>
    <a v-bind:href="url">index</a>
    <a :href="url">index</a>
    <button v-on:click="btnClick">按钮1</button>
    <button @click="btnClick">按钮1</button>

    <!--
        语法糖
           v-bind的语法糖  --- :[属性名称]=
           v-on的语法糖    ---- @[事件名称]=
    -->

</div>
</body>
<script src="../../../lib/vue.js"></script>
<script>

    new Vue({
        el: '#app',
        data: {
            url: 'index.html'
        }, methods: {
            btnClick:function () {
                alert('click')
            }
        }
    })
</script>
</html>